# $Id: PKGBUILD 84633 2013-02-21 01:33:19Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Thomas Dziedzic < gostrc at gmail >

pkgname=sunpinyin-data
pkgver=2.0.3.20130220
pkgrel=1
arch=('any')
pkgdesc="Statistical language model data from open-gram project for sunpinyin"
license=('APACHE')
provides=("sunpinyin-data-le=$pkgver")
url="http://sunpinyin.googlecode.com"
makedepends=("sunpinyin")
source=('http://open-gram.googlecode.com/files/lm_sc.t3g.arpa-20121025.tar.bz2'
        'http://open-gram.googlecode.com/files/dict.utf8-20130220.tar.bz2')

build() {
  mkdir -p "$srcdir/raw"
  ln -sf "$srcdir/lm_sc.t3g.arpa" "$srcdir/raw/lm_sc.t3g.arpa"
  ln -sf "$srcdir/dict.utf8" "$srcdir/raw/dict.utf8"

  ln -sf "/usr/share/doc/sunpinyin/SLM-inst.mk" "$srcdir/raw/Makefile"
  cd "$srcdir/raw"
  make
}

package() {
  cd "$srcdir/raw"
  make DESTDIR="$pkgdir" install
}

md5sums=('0586241ca33359ad176c842c90bf563e'
         '1e95894a4a3d8923e86e7b78c77ac815')
